package com.factorit.utils;


public class DaoEmulator {
/*
	// return user list
	public static List<User> getUsers() {

		UserProfile userProfile1 = new UserProfile();
		UserProfile userProfile2 = new UserProfile();
		UserProfile userProfile3 = new UserProfile();
		UserProfile userProfile4 = new UserProfile();
		UserProfile userProfile5 = new UserProfile();
		UserProfile userProfile6 = new UserProfile();
		UserProfile userProfile7 = new UserProfile();
		UserProfile userProfile8 = new UserProfile();
		UserProfile userProfile9 = new UserProfile();
		UserProfile userProfile10 = new UserProfile();

		User user1 = new User();
		User user2 = new User();
		User user3 = new User();
		User user4 = new User();
		User user5 = new User();
		User user6 = new User();
		User user7 = new User();
		User user8 = new User();
		User user9 = new User();
		User user10 = new User();

		List<User> users = new ArrayList<User>();

		userProfile1.setFirstName("Amanda");
		userProfile1.setLastName("Sunigham");

		userProfile2.setFirstName("Sherryl");
		userProfile2.setLastName("Straw");

		userProfile3.setFirstName("Kim-Yong");
		userProfile3.setLastName("Park");

		userProfile4.setFirstName("Sunico");
		userProfile4.setLastName("Jinseng");

		userProfile5.setFirstName("Kevin");
		userProfile5.setLastName("Durand");

		userProfile6.setFirstName("Gillian");
		userProfile6.setLastName("Scott");

		userProfile7.setFirstName("Prashanta");
		userProfile7.setLastName("Kumar");

		userProfile8.setFirstName("Greta");
		userProfile8.setLastName("Smith");

		userProfile9.setFirstName("George");
		userProfile9.setLastName("Dunham");

		userProfile10.setFirstName("Andrew");
		userProfile10.setLastName("Scully");

		user1.setUserProfile(userProfile1);
		user2.setUserProfile(userProfile2);
		user3.setUserProfile(userProfile3);
		user4.setUserProfile(userProfile4);
		user5.setUserProfile(userProfile5);
		user6.setUserProfile(userProfile6);
		user7.setUserProfile(userProfile7);
		user8.setUserProfile(userProfile8);
		user9.setUserProfile(userProfile9);
		user10.setUserProfile(userProfile10);

		users.add(user1);
		users.add(user2);
		users.add(user3);
		users.add(user4);
		users.add(user5);
		users.add(user6);
		users.add(user7);
		users.add(user8);
		users.add(user9);
		users.add(user10);

		return users;
	}

	public static List<Event> getEvents() {

		Event event1 = new Event();
		Event event2 = new Event();
		Event event3 = new Event();
		Event event4 = new Event();
		Event event5 = new Event();

		List<Event> events = new ArrayList<Event>();

		event1.setDescription("Meeting with President Obama");
		event1.setPlace("White House");
		Date date1 = new GregorianCalendar(2009, 0, 21, 17, 00).getTime();
		event1.setDate(date1);
		event1.setType("meeting");
		event1.setPriority("high");

		event2.setDescription("George Richards");
		event2.setPlace("");
		Date date2 = new GregorianCalendar(2009, 1, 10, 9, 30).getTime();
		event2.setDate(date2);
		event2.setType("birthday");

		event3.setDescription("Prepare the product presentation");
		event3.setPlace("");
		Date date3 = new GregorianCalendar(2009, 1, 3, 14, 15).getTime();
		event3.setDate(date3);
		event3.setType("task");

		event4.setDescription("Meeting with Gillian Scott");
		event4.setPlace("Fit Headquarters");
		Date date4 = new GregorianCalendar(2008, 9, 6, 15, 00).getTime();
		event4.setDate(date4);
		event4.setType("meeting");

		event5.setDescription("Send mail to SEP Provider");
		event5.setPlace("");
		Date date5 = new GregorianCalendar(2008, 8, 29, 11, 30).getTime();
		event5.setDate(date5);
		event5.setType("task");

		events.add(event1);
		events.add(event2);
		events.add(event3);
		events.add(event4);
		events.add(event5);

		return events;
	}

	public static List<Contact> getContacts() {
		List<Contact> contacts = new ArrayList<Contact>();

		Contact contact1 = new Contact();
		Contact contact2 = new Contact();

		contact1.setName("Kim-Yong Park");
		contact2.setName("Sally McDowell");
		for (int i = 0; i < new Integer(2); i++) {
			contacts.add(contact1);
			contacts.add(contact2);
		}

		return contacts;
	}

	public static List<Document> getDocuments() {
		List<Document> attachDocuments = new ArrayList<Document>();

		Document document1 = new Document();
		Document document2 = new Document();

		document1.setName("dynacrud.pdf");
		document2.setName("presentation.pps");
		for (int i = 0; i < new Integer(2); i++) {
			attachDocuments.add(document1);
			attachDocuments.add(document2);
		}

		return attachDocuments;
	}

	
	public static Document getDocument() {
		Document document = new Document();

		String firstName = "Sherryl";
		String lastName = "Callahan";
		GregorianCalendar dateAssigned = new GregorianCalendar(2009, 1, 15, 17, 45);
		
		UserProfile userProfile = new UserProfile();
		userProfile.setLastName(lastName);
		userProfile.setFirstName(firstName);

		User fromUser = new User();
		fromUser.setUserProfile(userProfile);
		
		//document.setFromUser(fromUser);
		document.setDateAssigned(dateAssigned.getTime());
		document.setId(new Long (1));
		
		List<Page> pages = new ArrayList<Page>();
		for (int i = 1; i < 6; i++) {
			Page page = new Page();
			page.setNumber(i);
	//		page.setUrl("../images/page_" + i + ".png");
			
			pages.add(page);
		}
		
		//document.setPagesPreview(pages);
		
		return document;
	}
	
	public static Message getMessage() {
		Message message = new Message();

		
		String lastName = "Sunigham";
		String firstName = "Amanda";
		
		
		UserProfile userProfile = new UserProfile();
		userProfile.setLastName(lastName);
		userProfile.setFirstName(firstName);
	//	userProfile.setImgname("../images/short1.jpg");

		User fromUser = new User();
		fromUser.setUserProfile(userProfile);
		
	//	message.setFromUser(fromUser);
		message.setBody("Remember to bring the presentation file and the projector for tomorrow meeting with the Goverment. See you tomorrow. Good Luck");
		
		
		
		return message;
	}

	public static List<Message> getNewMessages() {
		List<Message> newMessages = new ArrayList<Message>();

		for (int i = 0; i < 1; i++) {
			Message message = DaoEmulator.getMessage();
			message.setId(new Long(i));
			newMessages.add(message);
		}

		return newMessages;
	}
	
	
	public static Task getTask() {
		Task task = new Task();

		GregorianCalendar deadline = new GregorianCalendar(2009, 1, 15, 17, 45);
		GregorianCalendar dateAssined = new GregorianCalendar(2009, 1, 15, 17,
				45);

		String subject = "Prepare the product presentation with "
				+ "Powerpoint and bring some paper backup in case of any problem.";
		String priority = "Medium";
		String status = "Pending";

		String lastName = "Park";
		String firstName = "Kim-Yong";

		UserProfile userProfile = new UserProfile();
		userProfile.setLastName(lastName);
		userProfile.setFirstName(firstName);

		User fromUser = new User();
		fromUser.setUserProfile(userProfile);

	//	task.setFromUser(fromUser);
		task.setDateAssigned(dateAssined.getTime());

		task.setSubject(subject);
	//	task.setPriority(priority);
	//	task.setStatus(status);
		task.setDeadline(deadline.getTime());
		//task.setContacts(DaoEmulator.getContacts());
	//	task.setAttachDocuments(DaoEmulator.getDocuments());

		return task;
	}

	public static List<Task> getNewTasks() {
		List<Task> newTasks = new ArrayList<Task>();

		for (int i = 0; i < 1; i++) {
			Task task = DaoEmulator.getTask();
			task.setId(new Long(i));
			newTasks.add(task);
		}

		return newTasks;
	}


	public static List<SocialObject> getAllNews() {
		List<SocialObject> news = new ArrayList<SocialObject>();

		news.addAll(getNewTasks());
		
		news.addAll(getNewMessages());
		
		news.add(getDocument());

		return news;
	}
*/	
}
